﻿using System.ServiceModel;
using System.ServiceModel.Web;
using System.Collections.Generic;
using System;

namespace ChessService
{
    [ServiceContract]
    public interface IServiceChess
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "MakeMove", RequestFormat = WebMessageFormat.Json)]
        MoveDetails MakeMove(MoveDetails details);
    }

    public class MoveDetails
    {
        public int StartRow { get; set; }
        public int StartColumn { get; set; }
        public int EndRow { get; set; }
        public int EndColumn { get; set; }
        public bool IsWhite { get; set; }
        public int? GameID { get; set; }
        public string GameState { get; set; }
    }
}
